<meta charset="utf8">
<?php
$pic = imagecreatetruecolor(50,20);
$red = imagecolorallocate($pic,255,0,0);
$white = imagecolorallocate($pic,255,255,255);
$blue = imagecolorallocate($pic,127,127,127);
$str = randStr(4);
imagefill($pic,0,0,$white);
imagestring($pic,5,5,5,$str,$blue);
if (empty($_POST)){
    ob_clean();
    header('Content-type:image/png');
    imagepng($pic);
    imagedestroy($pic);
}else{
    $yzm = $_POST['yzm'];
    echo $yzm;
    echo $str;
}
?>
